improve extensions management and usage context#8926
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1adcc39885
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8d9b1d3 to
08f6a41
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9313b4309b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e79bd7facc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82fda94231
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cd62a80a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab85f69863
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
ab85f69 to
61d82aa
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61d82aa14d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9150ad1965
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| owners.add(toolRequestOwnerKey(content)); | ||
| } | ||
| } | ||
| } | ||
| return Array.from(owners).sort().join("|"); |
There was a problem hiding this comment.
Refresh extension status on repeated owner activity
The status fetch is keyed off toolOwnerSignature, but this signature is built from a deduplicated owner set, so it does not change when more tool calls arrive from owners already seen. In practice, if the first fetch fails or an extension transitions state later (for example after reconnect/auth), the widget can keep stale failed/unavailable data indefinitely because the effect never reruns for same-owner activity. Use a signature that changes per tool request (count or latest timestamp) or trigger periodic/focus refreshes.
Useful? React with 👍 / 👎.
| item.config_key === configKey | ||
| ? { ...item, enabled: extension.enabled } | ||
| : item, |
There was a problem hiding this comment.
Restore toggle state from authoritative source on errors
The error rollback writes enabled: extension.enabled from the callback argument, which can be an intermediate optimistic value during rapid consecutive toggles. If multiple toggle requests fail, version gating suppresses earlier rollbacks and the final rollback may preserve the wrong optimistic state, leaving UI and backend out of sync until a later full reload. Capture the pre-toggle value from current state per request or force a fetchExtensions() on failure to realign.
Useful? React with 👍 / 👎.
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46f7464055
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const toolOwnerSignature = useMemo(() => { | ||
| const owners = new Set<string>(); | ||
| for (const message of messages) { | ||
| for (const content of message.content) { | ||
| if (content.type === "toolRequest") { | ||
| owners.add(toolRequestOwnerKey(content)); |
There was a problem hiding this comment.
Trigger extension-status refresh for repeated tool activity
Build the refresh key from all tool requests (or include a monotonic counter/timestamp), not just a deduplicated owner set. As written, once an owner appears once, additional calls from that same owner do not change toolOwnerSignature, so the effect never refetches status; if the first fetch failed or the extension later reconnects/authenticates, the widget can stay stale indefinitely for that chat.
Useful? React with 👍 / 👎.
🤖 Category: improvement
User Impact: Users get a dedicated Extensions view and clearer chat context about which extensions were actually used, while agent-enabled MCP extensions are now scoped to the current chat/session instead of silently changing future chats.
Problem: Extension management was split across settings, config defaults, chat-time extension usage, and agent-managed MCP enablement. The previous branch behavior blurred those boundaries: when the Extension Manager enabled an MCP extension from chat, it persisted that as a global config change for future chats. We also had a temporary special case that kept global toggles for three default-off Goose capabilities (
chatrecall,summarize, andcode_execution), which is no longer the right model.Solution: This PR separates extension defaults from session state:
stdio/streamable_http) can still be added, edited, and deleted from the Extensions view, but they no longer have global enable/disable toggles.chatrecall,summarize, andcode_execution.extension_data.enabled_extensions.Notable implementation details
Session-scoped agent extension management
crates/goose/src/agents/platform_extensions/ext_manager.rsnow treatsmanage_extensionsas a session operation.ExtensionManager, upserts it into the current session's saved extension list, and reports that it was enabled "for this session."Session status API and generated types
crates/goose-sdk/src/custom_requests.rsadds typed DTOs for session extension status, includingExtensionConfigDto,SessionExtensionStatusDto, andExtensionConnectionStatusDto.crates/goose/src/acp/server/extensions.rsreturns typed status records instead of ad hoc JSON, redacts secret env/header values, and includes tool inventory for connected extensions.Global config and settings behavior
crates/goose/src/config/extensions.rsresolves extension lookup through normalized config keys, so display names and config keys line up more reliably.ui/goose2/src/features/extensions/ui/ExtensionItem.tsxno longer renders global enable/disable toggles; user-managed external extensions remain configurable via the settings button.ui/goose2/src/features/extensions/hooks/useExtensionsSettings.tspreserves an existing extension'senabledvalue when editing its config.chatrecall,summarize, andcode_executionwas removed.Chat extension usage
ui/goose2/src/features/chat/ui/widgets/ExtensionsWidget.tsxfetches_goose/session/extensions/status, merges in configured extension metadata for historical/unavailable usage, and displays only extensions used by tool requests in the current chat.ui/goose2/src/shared/api/acpNotificationHandler.tsnow reads tool identity from the actual_meta.goose.mcpAppmetadata shape, keeps the older_meta.goose.toolCallpath as a fallback, and attachestoolName/extensionNamein both live and replay flows.Navigation and UI
Reproduction Steps
stdio/streamable_httpextensions can be configured, edited, and deleted, but do not show global enable/disable controls.chatrecall,summarize, andcode_execution, do not get special global enable/disable controls.Verification
cargo fmtjust generate-acp-typespnpm test src/features/extensions/lib/__tests__/extensionUsage.test.ts src/features/extensions/lib/__tests__/extensionCategories.test.tspnpm test src/features/extensions/ui/__tests__/ExtensionsSettings.test.tsxpnpm test src/shared/api/__tests__/acpNotificationHandler.test.tspnpm typecheckgit diff --checkScreen.Recording.2026-04-29.at.7.27.54.PM.mov